package code.example.zookeeper.apply.config.producer;

import code.example.zookeeper.ZookeeperHolder;
import code.example.zookeeper.apply.config.ConfigNode;

public class ZKNodeProducer {
    ZookeeperHolder zookeeperHolder = new ZookeeperHolder();

    public void create(ConfigNode configNode) throws Exception {
        String root = "/config";
        if(zookeeperHolder.exists(root)==null){
            zookeeperHolder.create(root);
        }
        configNode.createZookeeperConfigNode(zookeeperHolder,"/config");
    }


}
